package com.letu.aopcache.model;

import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
public class RelatedCacheWrapper implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 最后加载时间
     * 当最后加载时间小于重启时间，则删除hash类型的缓存
     */
    private long lastLoadTime;

    /**
     * 缓存时长
     */
    private int expire;

    /**
     * 请求头信息，非业务参数
     */
    private Map<String, Object> header;

    /**
     * 类名
     */
    private String className;

    /**
     * 方法名
     */
    private String methodName;
    /**
     * 获取目标实例
     *
     * @return 目标实例
     */
    private Object target;

    /**
     * 参数
     */
    private Object[] args;

    public RelatedCacheWrapper(long lastLoadTime, int expire, Map<String, Object> header, String className, String methodName, Object[] args) {
        this.lastLoadTime = lastLoadTime;
        this.expire = expire;
        this.header = header;
        this.className = className;
        this.methodName = methodName;
        this.args = args;
    }
}
